package com.zrar.ak.gkpt.controller.common;

import com.zrar.ak.gkpt.service.common.IBuildUnitService;
import com.zrar.ak.gkpt.util.JsonResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * @ClassName: BuildUnitController
 * @Description 建设单位相关信息Controller层
 * @Author liyang
 * @Time 2020/03/09
 */
/*@RestController
@RequestMapping("/buildUnit")
@Api(tags = "建设单位相关信息接口")
@Slf4j   //该注解可以进行日志输出  log*/
public class BuildUnitController {

    @Autowired
    private IBuildUnitService buildUnitService;

    @RequestMapping(value = "getBuildUnitInfoList", method = RequestMethod.GET, produces = {"application/json; charset=utf-8"})
    @ApiOperation(value = "获取建设单位信息集合(包括台账录入情况和备案的流转情况)-条件查询", httpMethod = "GET", notes = "获取建设单位信息集合(包括台账录入情况和备案的流转情况)-条件查询")
    public JsonResult getBuildUnitAccountInfoList(HttpServletRequest request,
                                                  @ApiParam(name = "buildUnitName", value = "建设单位名称(模糊查询)") @RequestParam(value = "buildUnitName",required=false) String buildUnitName){
        JsonResult jsonResult = new JsonResult();
        jsonResult = buildUnitService.getBuildUnitInfoList(jsonResult, buildUnitName);
        return jsonResult;
    }



}
